<template>
  <div class="pie-class">
    <BaseEchart :options="options"></BaseEchart>
  </div>
</template>

<script setup lang="ts">
  import {defineProps,withDefaults,computed} from 'vue'
  import { IDataType } from '../types';
  import BaseEchart from '@/base-ui/echart';

  const props = withDefaults(defineProps<{
    pieData:IDataType
  }>(),{

  })
  const options = computed(()=>{
    return {
  tooltip: {
    trigger: 'item'
  },
  legend: {
    orient: 'horizontal',
    left: 'left'
  },
  series: [
    {
      name: '分类数据',
      type: 'pie',
      radius: '50%',
      data: props.pieData,
      emphasis: {
        itemStyle: {
          shadowBlur: 10,
          shadowOffsetX: 0,
          shadowColor: 'rgba(0, 0, 0, 0.5)'
        }
      }
    }
  ]
};
})
</script>

<style lang="less" scoped>

</style>